package com.panopset.db;

import java.io.StringWriter;


public class FieldVarchar extends DataField {
    private int size;

    public FieldVarchar(final String name, final int length) {
        super(name);
        size = length;
    }

    @Override
    public String getAttributes() {
        if (attrs == null) {
            StringWriter sw = new StringWriter();
            sw.append("varchar(" + size);
            sw.append(")");
            attrs = sw.toString();
        }
        return attrs;
    }

    private String attrs;
}
